package com.caption.core.model.entity;

import lombok.Data;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;

/**
 * @description: TODO
 * @author: 码农
 * @date: 2021-12-25 18:55:06
 */
@Data
public class PageParam {
    /**
     * 第几页
     */
    private Integer pageIndex=1;
    /**
     * 每页10条
     */
    private Integer pageSize=10;

    public Pageable pageable() {
        return PageRequest.of(pageIndex - 1, pageSize);
    }
}
